package com.xms.sdk.core.query;

import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

/**
 * <p>
 * ConditionExpression
 * </p>
 *
 * @author migo
 * @since 2021/9/1
 */
public class ConditionExpression implements Serializable {

    public String AttributeName;

    public String CompareAttributeName;

    public int Operator;

    public List<Object> Values;

    public ConditionExpression()
    {
    }

    public ConditionExpression(String attributeName, int conditionOperator, Object... values)
    {
        //Guard.NotEmpty(attributeName, "attributeName");
        this.AttributeName = attributeName;
        this.Operator = conditionOperator;
        if (values != null)
        {
            this.Values = Arrays.asList(values);
        }
    }

    public ConditionExpression(String attributeName, int conditionOperator, List<Object> values)
    {
        //Guard.NotEmpty(attributeName, "attributeName");
        this.AttributeName = attributeName;
        this.Operator = conditionOperator;
        if (values != null)
        {
            this.Values = Arrays.asList(values);
        }
    }
}
